<script>
import { defineComponent } from "vue";
import {pageHandler} from '@/mixins/pageHandler'
import RightClickmenuList from "@/components/rightClickmenuList/rightClickMenuList.vue";
import YaokongDialog from "@/components/rightClickmenuList/yaokongDialog.vue";
import GuapaiDialog from "@/components/rightClickmenuList/guapaiDialog.vue";
import ScaleBox from "@/components/ScaleBox/ScaleBox.vue";
import MonitorHeader from "@/components/MonitorHeader/MonitorHeader.vue";
import NetState from "@/components/controls/netState.vue";
import ConnectLine from "@/components/controls/connect-line.vue";
import TerminalSvg from "@/components/controls/terminal-svg.vue";
import Zhanyongbian from "@/components/controls/zhanyongbian.vue";
import TwoTriangle from "@/components/controls/twoTriangle.vue";
import ShouCheSvg from "@/components/controls/shou-che-svg.vue";
import RectSvg from "@/components/controls/rect-svg.vue";
import KongZhiBaShou from "@/components/controls/KongZhiBaShou.vue";
import YingYaBan from "@/components/controls/YingYaBan.vue";
import RuanYaBan from "@/components/controls/RuanYaBan.vue";

export default defineComponent({
  name: "zhubian",
  components: {
      RuanYaBan,
      YingYaBan,
      KongZhiBaShou,
      RectSvg,
      ShouCheSvg,
      TwoTriangle, Zhanyongbian, TerminalSvg, ConnectLine, NetState, MonitorHeader, ScaleBox, GuapaiDialog, YaokongDialog, RightClickmenuList },
  mixins: [pageHandler],
  data() {
    return {
      hardPlatenDataList: [],
      flexiblePlatenDataList: [],
      GZPDataList: [],
      netStateList: [],
      numList:[],
      bashouList:[],
    };
  },
  methods:{
    initData(e){
      const typeMap = {
        "硬压板": "hardPlatenDataList",
        "通讯状态": "netStateList",
        "遥测":'numList',
        "操作把手":"bashouList",
          "软压板":"flexiblePlatenDataList",
      };

      for (const listName of Object.values(typeMap)) {
        this[listName] = [];
      }
      for (const [key, value] of Object.entries(e)) {
        for (const [type, listName] of Object.entries(typeMap)) {
          const filtered = value.filter(item => item.type === type);
          if (filtered.length > 0) {
            this[listName].push({ name: key, list: filtered });
          }
        }
      }
      this.numList=this.numList.filter(item=> item.name!=='yx'&&item.name!=='重要遥测')

        console.log(this.netStateList)

    }
  }
});
</script>

<template>
  <div class="breaker-graph" @click="cancelLeftClickMenu" @contextmenu.stop="cancelLeftClickMenu" v-if="pageData">
    <scale-box :width="2120">
      <MonitorHeader :title="$route.query.ftName" >
        <template v-slot:btns>
          <button @click="routerToMainPage">主接线图</button>
          <button @click="">动作光字牌分图</button>
          <button @click="">告警光字牌分图</button>
          <button @click="clearAll($route.query.ftName)">画面清闪</button>
          <button @click="operationRecords">操作记录</button>
        </template>
      </MonitorHeader>
      <main>
      <div>
          <div class="line-wrapper">
              <svg>
                  <g>
                      <line x1="35" y1="0" x2="495" y2="0" stroke="rgb(240,65,85)" stroke-width="5"></line>
                      <text x="0" y="30" style="fill: rgb(255,255,255);font-size: 20px">110kV2#母线</text>

                      <line x1="160" y1="400" x2="250" y2="400" stroke="rgb(0,210,0)" stroke-width="5"></line>
                      <text x="80" y="390" style="fill: rgb(255,255,255);font-size: 18px">10kV2B#母线</text>
                      <line transform="translate(-30,0)" x1="310" y1="400" x2="400" y2="400" stroke="rgb(0,210,0)" stroke-width="5"></line>
                      <text x="340" y="390" style="fill: rgb(255,255,255);font-size: 18px">10kV2A#母线</text>
                      <line x1="265" y1="0" x2="265" y2="30" stroke="rgb(240,65,85)" stroke-width="2"></line>
                      <connect-line
                              :state="Number(pageData['glg'][0].state_val)"
                              :stateDesc="pageData['glg'][0].state_desc"
                              :name="pageData['glg'][0].state_desc"
                              :scale=0.7
                              :info="pageData['glg'][0]"
                              :translate-x="293"
                              :translate-y="34"
                              :text-translate-y="-5"
                              :text-translate-x="5"
                              :rotate="90"
                              @itemRightClick="itemRightClick"
                      />
                      <line x1="265" y1="67" x2="265" y2="107" stroke="rgb(240,65,85)" stroke-width="2"></line>
                      <polyline points="265,87,215,87,215,67" stroke="rgb(240,65,85)" stroke-width="2" fill="none"></polyline>
                      <terminal-svg
                              :state="Number(pageData['dd'][1].state_val)"
                              :stateDesc="pageData['dd'][1].state_desc"
                              :name="pageData['dd'][1].state_desc"
                              :scale=0.7
                              :info="pageData['dd'][1]"
                              :translate-x="197"
                              :translate-y="22"
                              :text-translate-y="25"
                              :text-translate-x="-55"
                              :rotate="0"
                              @itemRightClick="itemRightClick"
                      />
                      <zhanyongbian color="rgb(240,65,85)" color_1="rgb(0,210,0)" :rotate="180" :translate-y="540" :translate-x="2106"></zhanyongbian>
                      <polyline points="265,120,165,120,165,132" stroke="rgb(240,65,85)" stroke-width="2" fill="none"></polyline>
                      <two-triangle color="rgb(240,65,85)" :translate-x="312" :translate-y="-9" :rotate="90"></two-triangle>
                      <terminal-svg
                              :state="Number(pageData['dd'][0].state_val)"
                              :stateDesc="pageData['dd'][0].state_desc"
                              :name="pageData['dd'][0].state_desc"
                              :scale=0.7
                              :info="pageData['dd'][0]"
                              :translate-x="182"
                              :translate-y="178"
                              :text-translate-y="45"
                              :text-translate-x="45"
                              :rotate="180"
                              @itemRightClick="itemRightClick"
                      />
                      <g transform="translate(40,-40)">
                          <text x="265" y="150" style="fill: rgb(255,255,255);font-size: 20px">档位：</text>
                          <text x="335" y="150" style="fill: rgb(255,255,255);font-size: 20px">{{ Number(pageData['重要遥测'].filter(item=>item.state_desc==='档位')[0].state_val) }}</text>
                          <text x="265" y="175" style="fill: rgb(255,255,255);font-size: 20px">温度1：</text>
                          <text x="335" y="175" style="fill: rgb(255,255,255);font-size: 20px">{{ Number(pageData['重要遥测'].filter(item=>item.state_desc==='温度1')[0].state_val).toFixed(2) }}</text>
                          <text x="265" y="200" style="fill: rgb(255,255,255);font-size: 20px">温度2：</text>
                          <text x="335" y="200" style="fill: rgb(255,255,255);font-size: 20px">{{ Number(pageData['重要遥测'].filter(item=>item.state_desc==='温度2')[0].state_val).toFixed(2) }}</text>
                      </g>
                          <line x1="265" y1="160" x2="265" y2="200" stroke="rgb(0,210,0)" stroke-width="2"></line>
                      <polyline points="205,400,205,200,325,200,325,400" stroke="rgb(0,210,0)" stroke-width="2" fill="none"></polyline>
                      <shou-che-svg
                              :shou-che-data-obj="pageData['sc'][3]"
                              :rotate="90" :translate-x="245" :translate-y="235" :title-x="-25" :title-y="-10"
                      ></shou-che-svg>
                      <shou-che-svg
                              :shou-che-data-obj="pageData['sc'][2]"
                              :rotate="90" :translate-x="365" :translate-y="235" :title-x="-25" :title-y="-10"
                      ></shou-che-svg>
                      <shou-che-svg
                              :shou-che-data-obj="pageData['sc'][1]"
                              :rotate="90" :translate-x="245" :translate-y="335" :title-x="-25" :title-y="20" :name="pageData['sc'][1].state_desc"
                      ></shou-che-svg>
                      <shou-che-svg
                              :shou-che-data-obj="pageData['sc'][0]"
                              :rotate="90" :translate-x="365" :translate-y="335" :title-x="-25" :title-y="20" :name="pageData['sc'][0].state_desc"
                      ></shou-che-svg>
                      <rect-svg
                              :state="Number(pageData['dlq'][0].state_val)"
                              :stateDesc="pageData['dlq'][0].state_desc"
                              :rotate="90"
                              :translate-y="230"
                              :translate-x="362"
                              :text-translate-x="-2"
                              :text-translate-y="0"
                              :scale="0.9"
                              :info="pageData.dlq[0]"
                              @itemRightClick="itemRightClick"
                              :itemObj="{is_clear:pageData['dlq'][0].is_clear}"
                              :name="pageData['dlq'][0].state_desc"
                      ></rect-svg>
                      <rect-svg
                              :state="Number(pageData['dlq'][1].state_val)"
                              :stateDesc="pageData['dlq'][1].state_desc"
                              :rotate="90"
                              :translate-y="230"
                              :translate-x="242"
                              :text-translate-x="-2"
                              :text-translate-y="0"
                              :scale="0.9"
                              :info="pageData.dlq[1]"
                              @itemRightClick="itemRightClick"
                              :itemObj="{is_clear:pageData['dlq'][1].is_clear}"
                              :name="pageData['dlq'][1].state_desc"
                      ></rect-svg>
                  </g>
              </svg>
          </div>
          <div>
              <div class="remote-measurement-wrapper">
                  <div class="remote-measurement-table">
                      <table border="3" cellspacing="0" class="numTab">
                          <colgroup>
                              <col style="width: 20%;" />
                              <col style="width: 20%;" />
                              <col style="width: 20%;" />
                              <col style="width: 20%;" />
                              <col style="width: 20%;" />
                          </colgroup>
                          <tbody>
                          <tr style="background-color: rgb(35,130,222)">
                              <td></td>
                              <td>{{numList[0].name}}</td>
                              <td>{{numList[1].name}}</td>
                              <td>{{numList[2].name}}</td>
                              <td>单位</td>
                          </tr>
                          <tr  v-for="(item, index) in numList[0].list" :key="index"   :style="{ backgroundColor: index % 2 === 0 ? 'rgb(36, 104, 176)' : 'rgb(35, 130, 222)',height:'30px'}">
                              <td :style="{color: 'white'}">{{item.state_desc}}</td>
                              <td style="color: #3CFF1E;cursor: pointer;" @contextmenu.prevent.stop="checkVal(item,true)">{{Number(item.state_val).toFixed(2)}}</td>
                              <td style="color: #3CFF1E;cursor: pointer;" @contextmenu.prevent.stop="checkVal(numList[1].list[index],true)">{{Number(numList[1].list[index].state_val).toFixed(2)}}</td>
                              <td style="color: #3CFF1E;cursor: pointer;" @contextmenu.prevent.stop="checkVal(numList[2].list[index],true)">{{Number(numList[2].list[index].state_val).toFixed(2)}}</td>
                              <td :style="{color: 'white'}">{{item.unit}}</td>
                          </tr>
                          </tbody>
                      </table>
                  </div>
              </div>
          </div>
      </div>
      <div>
          <div class="bashou">
              <p style="text-align: center;font-size: 1.4rem;border-bottom: 3px solid white">操作把手</p>
              <div class="control-handle-wrapper">
                  <div class="control-handle-grid">
                      <div v-for="(item, index) in this.pageData['操作把手']" :key="index" class="control-handle-grid-item">
                          <template v-if="item.isEmpty"></template>
                          <template v-else>
                              <div class="svg-wrapper">
                                  <svg>
                                      <g v-if="item.state_desc.includes('解锁')">
                                          <text x="20" y="15" fill="#FFFFFF" font-size="12px">联锁</text>
                                          <text x="60" y="60" fill="#FFFFFF" font-size="12px">解锁</text>
                                      </g>
                                      <g v-else>
                                          <text x="20" y="15" fill="#FFFFFF" font-size="12px">远方</text>
                                          <text x="60" y="60" fill="#FFFFFF" font-size="12px">就地</text>
                                      </g>
                                  </svg>
                                  <div class="polygon-icon">
                                      <div  class="cursor-pointer" style="cursor: pointer">
                                          <KongZhiBaShou style="margin-top: -10px" :info="item" :name="item.state_desc" :state="Number(item.state_val)"  @itemRightClick="itemRightClick" :deviceName="item.state_desc"  :jianGeMing="item.jg_name"></KongZhiBaShou>
                                      </div>
                                  </div>
                              </div>
                              <div class="grid-item-name">{{item.state_desc}}</div>
                          </template>
                      </div>
                  </div>
              </div>
          </div>
          <div class="yingyaban_1">
           <div style="font-size: 1.6rem;text-align: center">{{hardPlatenDataList[0].name}}</div>
              <div class="hard-platen-wrapper" style="width: 100%;">
                  <div class="hard-platen-item">
                      <div class="list-item" v-for="(o, i) in hardPlatenDataList[0].list" :key="i">
                          <div class="list-item-name" style="cursor: pointer;">{{o.state_desc}}</div>
                          <div class="list-item-svg" >
                              <YingYaBan :info="o" :state="Number(o.state_val)" :scale="0.7" style="position: absolute;top: -10px"></YingYaBan>
                          </div>
                      </div>
                  </div>
              </div>
          </div>

      </div>
      <div>
          <div class="netState">
              <div class="netInner">
                  <div class="netState_list" v-for="item in this.netStateList[0].list" >
                      <div class="netTitle">{{item.state_desc}}</div>
                      <net-state :info="item" :state="item.state_val"></net-state>
                  </div>
              </div>

          </div>
                  <div class="flexible-platen-wrapper">
                      <div class="flexible-platen-inner">
                          <div class="flexible-platen-list">
                              <div v-for="(item, index) in flexiblePlatenDataList" :key="index" class="flexible-platen-item">
                                  <div class="item-name">{{item.name}}</div>
                                  <div class="list-item" v-for="(o, i) in item.list" :key="i" @click.prevent.stop="itemRightClick($event, 'ruanyaban', o.state_desc,Number(o.state_val), o.id,o.jg_name,o)">
                                      <div class="list-item-svg cursor-pointer">
                                          <RuanYaBan :state="Number(o.state_val)" :info="o"></RuanYaBan>
                                      </div>
                                  </div>
                              </div>
                          </div>
                      </div>
                  </div>
          <div class="yingyaban_1" style="height: 20%">
              <div style="font-size: 1.6rem;text-align: center">{{hardPlatenDataList[1].name}}</div>
              <div class="hard-platen-wrapper">
                  <div class="hard-platen-item" style="overflow-y: hidden;height: 84%;display: flex ;flex-direction: column;flex-wrap: wrap">
                      <div class="list-item" v-for="(o, i) in hardPlatenDataList[1].list" :key="i" style="width: 47.5%;height: 19%" :style="i === 4 ? 'border-top: 1px solid #fff;' : ''">
                          <div class="list-item-name" style="cursor: pointer;">{{o.state_desc}}</div>
                          <div class="list-item-svg" >
                              <YingYaBan :info="o" :state="Number(o.state_val)" :scale="0.7" style="position: absolute;top: -10px"></YingYaBan>
                          </div>
                      </div>
                  </div>
              </div>
          </div>
      </div>
      </main>
    </scale-box>
  <rightClickmenuList v-if="rightMenuObj&&showMenu" :rightMenuObj="rightMenuObj" @menuItemClick="menuItemClick"></rightClickmenuList>
  <el-dialog  custom-class="yaokongPersonDialog" :visible.sync="operatorPwdDialogVisible_0" width="22%" :close-on-click-modal="false">
    <p slot="title" class="el-dialog__title">操作人</p>
    <div class="operatorPwd">
      <div class="operator">
        <label>请输入操作人</label>
        <el-select size="small" v-model="operatorPwdObj.username" style="width: 16rem;">
          <el-option
            v-for="(item,index) in userInfoJson.operatorList"
            :key="index"
            :label="item.username"
            :value="item.username"
          ></el-option>
        </el-select>
      </div>
      <div class="pwd">
        <label>请输入密码</label>
        <el-input v-model="operatorPwdObj.pwd" size="small" type="password"   @keydown.enter.native="operatorPwdSubmit_0"></el-input>
      </div>
    </div>
    <span slot="footer" class="dialog-footer" >
				<el-button size="small" @click="operatorPwdSubmit_0">确 定</el-button>
				<el-button size="small" @click="operatorPwdDialogVisible_0 = false">取 消</el-button>
			</span>
  </el-dialog>
  <el-dialog  custom-class="yaokongPersonDialog" :visible.sync="operatorPwdDialogVisible" width="22%" :close-on-click-modal="false">
    <p slot="title" class="el-dialog__title">监护人</p>
    <div class="operatorPwd">
      <div class="operator">
        <label>请输入监护人</label>
        <el-select size="small" v-model="adminPwdObj.username" style="width: 16rem;">
          <el-option
            v-for="(item,index) in userInfoJson.adminList"
            :key="index"
            :label="item.username"
            :value="item.username"
          ></el-option>
        </el-select>

      </div>
      <div class="pwd">
        <label>请输入监护员密码</label>
        <el-input v-model="adminPwdObj.pwd" size="small" type="password" @keydown.enter.native="operatorPwdSubmit"></el-input>
      </div>
    </div>
    <span slot="footer" class="dialog-footer" >
				<el-button size="small" @click="operatorPwdSubmit">确 定</el-button>
				<el-button size="small" @click="operatorPwdDialogVisible = false">取 消</el-button>
			</span>
  </el-dialog>
  <el-dialog
    custom-class="switchPatrolDialog"
    :visible.sync="dialogVisible"
    :close-on-press-escape="true"
    :close-on-click-modal="true"
    :width="`40%`"
    :modal="false"
    @before-close="handleDialogClose"
  >

    <!-- 隔离刀 -->
    <template v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.type == 'gelidao'">

      <!-- 遥控 - 弹框 -->
      <template v-if="currentSelectMenuItemObj.currentSelectItem.value == 1">
        <p slot="title" class="el-dialog__title">遥控</p>
        <yaokongDialog :currentSelectMenuItemObj="currentSelectMenuItemObj" :text="yaokongMsg"></yaokongDialog>
      </template>

      <!-- 开关清闪 - 弹框 -->
      <template v-if="currentSelectMenuItemObj.currentSelectItem.value == 2">
        <p slot="title" class="el-dialog__title">开关清闪</p>
      </template>



      <!-- 挂牌/摘牌 - 弹框 -->
      <template v-if="currentSelectMenuItemObj.currentSelectItem.value == 6">
        <p slot="title" class="el-dialog__title">挂牌/摘牌</p>
        <guapaiDialog :currentSelectMenuItemObj="currentSelectMenuItemObj"></guapaiDialog>
      </template>

      <span slot="footer" class="dialog-footer" >
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value != 4" size="small" @click="dialogVisible = false">取 消</el-button>

        <!-- 遥控 按钮 -->
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value == 1&&!canyaoKong" size="small" @click="yaokongSelect">遥控选择</el-button>
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value == 1&&canyaoKong" size="small" @click="remoteControlSelect">遥控执行</el-button>
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value == 1" size="small" type="primary" plain @click="dialogVisible = false">关 闭</el-button>
        <!-- 挂牌/摘牌 按钮 -->
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value == 6" size="small" type="primary" @click="handleBrand">确 定</el-button>

				</span>
    </template>

    <!-- 地刀 -->
    <template v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.type == 'didao'">
      <!--          遥控-->
      <template v-if="currentSelectMenuItemObj.currentSelectItem.value == 1">
        <p slot="title" class="el-dialog__title">遥控</p>
        <yaokongDialog :currentSelectMenuItemObj="currentSelectMenuItemObj" :text="yaokongMsg"></yaokongDialog>
      </template>
      <!-- 开关清闪 - 弹框 -->
      <template v-if="currentSelectMenuItemObj.currentSelectItem.value == 0">
        <p slot="title" class="el-dialog__title">开关清闪</p>
        <span>暂无内容</span>
      </template>

      <!-- 全站清闪 - 弹框 -->
      <template v-if="currentSelectMenuItemObj.currentSelectItem.value == 4">
        <p slot="title" class="el-dialog__title">全站清闪</p>
        <span>暂无内容</span>
        <!-- <yaokongDialog :currentSelectMenuItemObj="currentSelectMenuItemObj"></yaokongDialog> -->
      </template>
      <!-- 挂牌/摘牌 - 弹框 -->
      <template v-if="currentSelectMenuItemObj.currentSelectItem.value == 5">
        <p slot="title" class="el-dialog__title">挂牌/摘牌</p>
        <guapaiDialog :currentSelectMenuItemObj="currentSelectMenuItemObj"></guapaiDialog>
      </template>
      <span slot="footer" class="dialog-footer" >
            <!-- 遥控 按钮 -->					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value == 0" size="small" @click="dialogVisible = false">取 消</el-button>
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value == 1&&!canyaoKong" size="small" @click="yaokongSelect">遥控选择</el-button>
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value == 1&&canyaoKong" size="small" @click="remoteControlSelect">遥控执行</el-button>
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value == 1" size="small" type="primary" plain @click="dialogVisible = false">关 闭</el-button>


        <!-- 挂牌/摘牌 按钮 -->
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value == 5" size="small" type="primary" @click="handleBrand">确 定</el-button>
				</span>
    </template>

    <!-- 断路器 -->
    <template v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.type == 'duanluqi'">
      <!-- 遥控 - 弹框 -->
      <template v-if="currentSelectMenuItemObj.currentSelectItem.value == 1">
        <p slot="title" class="el-dialog__title">遥控</p>
        <yaokongDialog :currentSelectMenuItemObj="currentSelectMenuItemObj" :text="yaokongMsg"></yaokongDialog>
      </template>
      <!-- 开关清闪 - 弹框 -->
      <template v-if="currentSelectMenuItemObj.currentSelectItem.value == 2">
        <p slot="title" class="el-dialog__title">开关清闪</p>
        <span>确定要将{{currentSelectMenuItemObj.currentObj.name}}开关清闪吗？</span>
        <!-- <yaokongDialog :currentSelectMenuItemObj="currentSelectMenuItemObj"></yaokongDialog> -->
      </template>
      <!-- 全站清闪 - 弹框 -->
      <template v-if="currentSelectMenuItemObj.currentSelectItem.value == 3">
        <p slot="title" class="el-dialog__title">全站清闪</p>
        <span>确定要将全部设备进行清闪吗？</span>
        <!-- <yaokongDialog :currentSelectMenuItemObj="currentSelectMenuItemObj"></yaokongDialog> -->
      </template>

      <!-- 挂牌/摘牌 - 弹框 -->
      <template v-if="currentSelectMenuItemObj.currentSelectItem.value == 6">
        <p slot="title" class="el-dialog__title">挂牌/摘牌</p>
        <guapaiDialog :currentSelectMenuItemObj="currentSelectMenuItemObj"></guapaiDialog>
      </template>
      <span slot="footer" class="dialog-footer" >
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value != 4" size="small" @click="dialogVisible = false">取 消</el-button>
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value == 2" size="small" @click="clearFlesh">确定</el-button>
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value == 3" size="small" @click="clearAll">确定</el-button>
        <!-- 遥控 按钮 -->
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value == 1&&!canyaoKong" size="small" @click="yaokongSelect">遥控选择</el-button>
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value == 1&&canyaoKong" size="small" @click="remoteControlSelect">遥控执行</el-button>
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value == 1" size="small" type="primary" plain @click="dialogVisible = false">关 闭</el-button>

        <!-- 挂牌/摘牌 按钮 -->
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value == 6" size="small" type="primary" @click="handleBrand">确 定</el-button>
				</span>
    </template>

    <!-- 把手 -->
    <template v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.type == 'bashou'">
      <!-- 操作 - 弹框 -->
      <template v-if="currentSelectMenuItemObj.currentSelectItem.value == 1">
        <p slot="title" class="el-dialog__title">操作</p>
        <span>暂无内容</span>
      </template>
      <span slot="footer" class="dialog-footer" >
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value != 2" size="small" @click="dialogVisible = false">取 消</el-button>

				</span>
    </template>



    <template v-if="currentSelectMenuItemObj&&currentSelectMenuItemObj.type=='ruanyaban'">
      <template v-if="currentSelectMenuItemObj.currentSelectItem.value == 1">
        <p slot="title" class="el-dialog__title">遥控</p>
        <yaokongDialog :currentSelectMenuItemObj="currentSelectMenuItemObj" :text="yaokongMsg"></yaokongDialog>
      </template>
      <span slot="footer" class="dialog-footer" >
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value == 2" size="small" @click="dialogVisible = false">取 消</el-button>

        <!-- 遥控 按钮 -->
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value == 1&&!canyaoKong" size="small" @click="yaokongSelect">遥控选择</el-button>
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value == 1&&canyaoKong" size="small" @click="remoteControlSelect">遥控执行</el-button>
					<el-button v-if="currentSelectMenuItemObj && currentSelectMenuItemObj.currentSelectItem.value == 1" size="small" type="primary" plain @click="dialogVisible = false">关 闭</el-button>
				</span>
    </template>




  </el-dialog>
  <el-dialog ref="operateRecordDialogRef" custom-class="operateRecordDialog" :modal="false" :close-on-click-modal="false" v-if="operationRecordsDialogVisible" :visible.sync="operationRecordsDialogVisible" v-dialogDrag:{dialogDrag}="true" width="35%">
    <p slot="title" class="el-dialog__title">操作记录</p>
    <div class="messageAlarmList">
      <el-table :data="operationRecordsData" width="100%" height="250" >
        <el-table-column prop="num" label="序号" width="85" header-align="center" align="center" >
          <template #default="{row}">
            <span :class="{'is-highlight': !!row.isHighlight}">{{row.num}}</span>
          </template>
        </el-table-column>
        <el-table-column prop="createTime" label="操作时间" width="160" header-align="center" align="center" >
          <template #default="{row}">
            <span :class="{'is-highlight': !!row.isHighlight}">{{row.createTime}}</span>
          </template>
        </el-table-column>
        <el-table-column prop="log_desc" label="操作描述" header-align="center" >
          <template #default="{row}">
            <span :class="{'is-highlight': !!row.isHighlight}">{{row.log_desc}}</span>
          </template>
        </el-table-column>
      </el-table>
    </div>
  </el-dialog>
</div>
</template>

<style scoped lang="less">
@import "@/assets/css/public";
main {
  height: calc(100% - 90px);
  display: flex;
  flex-direction:row;
  justify-content: space-between;
  color: #FFFFFF;
  & > div {
    border: 1px solid white;
    &:nth-of-type(1) {
      flex: 1;
      height: 100%;
    }
    &:nth-of-type(2) {
      flex: 1;
      height: 100%;
    }
    &:nth-of-type(3) {
      flex: 2;
      height: 100%;
    }

  }
}
.line-wrapper {
  border-bottom: 3px solid #fff;
  height: 450px;
  padding: 10px 0;
  box-sizing: border-box;
  svg {
    width: 100%;
    height: 100%;
  }
}
.numTab{
  margin-top: 1.5rem !important;
}
.numTab td{
  height: 40px;
}
.bashou{
  border-bottom: 3px solid #fff;
  margin-top: -1.2rem;
}
.control-handle-wrapper {
  padding: 10px;
  box-sizing: border-box;
  position: relative;
  width: 90%;
  margin: 0 auto;
  .control-handle-name {
    text-align: center;
    line-height: 30px;
    font-size: 20px;
    border-bottom: none;
    padding: 4px;
  }
  .control-handle-grid {
    width: 100%;
    display: grid;
    grid-template-rows: repeat(2, 1fr);
    grid-template-columns: repeat(3, 1fr);
    .control-handle-grid-item {
      height: 100px;
      text-align: center;
      padding: 0px;
      box-sizing: border-box;
      position: relative;
      .svg-wrapper {
        width: 100%;
        height: 70px;
        svg {
          width: 100%;
          height: 100%;
          position: absolute;
          left: 0;
        }
        .rotate {
          transform-origin: center;
        }
        .polygon-icon {
          position: absolute;
          left: 10px;
          top: 36px;
          width: 50px;
          height: 50px;
        }
      }
      .grid-item-name {
        margin-top: 10px;
        font-size: 13px;

      }
    }
  }
}
.hard-platen-wrapper {
  height: 100%;
  padding: 10px;
  box-sizing: border-box;
  width: 100%;
  .hard-platen-inner {
    height: 100%;
    position: relative;

  }
  .hard-platen-name {
    text-align: center;
    height: 30px;
    line-height: 30px;
    font-size: 18px;
    border-bottom: 2px solid #FFFFFF;
    padding: 2px;
    position: sticky;
    background-color: #000000;
    top: 1px;
  }
  .hard-platen-item {
    height: 89%;
    overflow-y: auto;
    .hard-platen-item-name {

      color: #a9765e;
      font-size: 16px;
      text-align: center;
      padding: 10px;
    }

    .list-item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 3px 10px;
     border: 1px solid #fff;
      border-top: none;
      .list-item-svg {
        width: 30px;
        height: 30px;
        flex-shrink: 0;
        margin-right: 10px;
        cursor: pointer;
        position: relative;
        svg {
          width: 100%;
          height: 100%;
        }
      }
      .list-item-name {
        font-size: 20px;
        width: 100%;
        text-align: center;
      }
    }
    .list-item:first-child {
      border-top: 1px solid #fff;
    }
  }
}
.yingyaban_1{
  margin-top: 1rem;
  height: 70%;
}
.netState{
  height: 10%;
  display: flex;
  justify-content: center;
  align-items: center;
  border-bottom: 3px solid #fff;
  .netInner{
    display: flex;
    flex-wrap: wrap;
    height: 90%;
    width: 90%;
    .netState_list{
      border: 1px solid #fff;
      width: 33%;
      display: flex;
      align-items: center;
      .netTitle{
        width: 150%;
        text-align: center;
        font-size: 1.4rem;
      }
    }
  }

}
.flexible-platen-wrapper {
  box-sizing: border-box;
  height: 65%;
  .flexible-platen-inner {
    border: 2px solid #FFFFFF;
    height: 100%;
    overflow-y: auto;
    position: relative;
  }
  .flexible-platen-list {
    display: flex;
    justify-content: space-between;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .flexible-platen-item {
    width:49.9%;


    &:nth-of-type(2n) {
      border-right: none;
      border-left: 2px solid #fff;
    }
    &:nth-of-type(3n + 1) {
      .item-name {
        color: #FFFFFF;
      }
      .list-item-name {
        color: #FFFFFF;
      }
    }
    .item-name {
      font-size: 1.4rem;
      text-align: center;
      padding: 8px 10px;
      border-bottom: 2px solid #FFFFFF;
    }
    .list-item {
      display: flex;
      align-items: center;
      border-bottom: 2px solid #FFFFFF;
      padding: 2px 10px;
      .list-item-svg {
        width: 50px;
        height: 25px;
        flex-shrink: 0;
        margin-right: 10px;
        cursor: pointer;
        svg {
          width: 100%;
          height: 100%;
        }
      }
    }
  }
}
</style>
